<div class="col_box">
    <div class="col_two clear">
        <div class="alert alert_block">
            <h4 class="alert_heading">温馨提示：</h4>
            <div class="<?= $type == 'cash' || $type == '' ? '' : 'hidden' ?> warmtips" rel="cash">现金账户表示你现在身上拥有的钱</div>
            <div class="<?= $type == 'bank' ? '' : 'hidden' ?> warmtips" rel="bank">银行卡/存储需要和信用卡区分开来</div>
            <div class="<?= $type == 'credit' ? '' : 'hidden' ?> warmtips" rel="credit">信用卡消费按普通消费记录支出即可,还款时选择信用卡还款即可</div>
            <div class="<?= $type == 'elec' ? '' : 'hidden' ?> warmtips" rel="elec">电子账户指支付宝/财付通之类的帐户</div>
            <div class="<?= $type == 'other' ? '' : 'hidden' ?> warmtips" rel="other">其它帐户指你的其它类型的帐户</div>
        </div>
        <form class="validform" method="post" action="/account/add/">
            <input type="hidden" name="domid" value="<?= $domid ?>" />
            <?php if ($type) { ?>
                <input type="hidden" name="type" value="<?= $type ?>" />
            <?php } ?>
            <dl><dt>账户类型：</dt>
                <dd>
                    <select name="type<?= $type ? 'disabled' : '' ?>" id="type" class="select" datatype="*" nullmsg="新增账户" <?= $type ? 'disabled' : '' ?>>
                        <?= get_account_type_option($type) ?>
                    </select>
                </dd></dl>
            <dl class="hidden"><dt>账户币种：</dt><dd>
                    <select name="currency_id" id="" class="select" disabled>
                        <?= get_account_currency_option() ?>
                    </select>
                </dd></dl>
            <dl class="hidden" rel="bank credit"><dt>银行名称：</dt><dd>
                    <select name="bank_id" id="bank_id" class="select">
                        <?= get_bank_option() ?>
                    </select>
                    <!--<input type="text" name="bank" id="bank" class="input" size="15" maxlength="15" style="width:100px;" datatype="*" nullmsg="银行名称不能为空" />-->
                </dd></dl>
            <dl class="hidden" rel="bank credit"><dt>卡后四位：</dt><dd><input type="text" name="number" id="number" class="input" size="15" maxlength="4" style="width:100px;" datatype="*" nullmsg="卡号后四位不能为空" /></dd></dl>
            <dl class="hidden" rel="credit"><dt>账单日期：</dt><dd><input type="text" name="billdate" id="billdate" class="input" size="4" maxlength="2" datatype="int1,n1-31" nullmsg="账单日期不能为空" errormsg="只能是1-31之间的数字"/>
                    <input type="checkbox" name="billdatelast" id="billdatelast" /> <label for="billdatelast">每月最后一天</label></dd></dl>
            <dl class="hidden" rel="credit"><dt>还款日期：</dt><dd><input type="text" name="repaydate" id="repaydate" class="input" size="4" maxlength="2" datatype="int1,n1-31" nullmsg="还款日期不能为空" errormsg="只能是1-31之间的数字" />
                    <input type="checkbox" name="repaydatelast" id="repaydatelast" /> <label for="repaydatelast">每月最后一天</label></dd></dl>
            <dl><dt>账户名称：</dt><dd><input type="text" name="name" id="name" class="input" size="15" maxlength="15" style="width:100px;" datatype="*" nullmsg="账户名称不能为空" /></dd></dl>
            <dl><dt>初始金额：</dt><dd><input type="text" name="balance" id="balance" class="input calculator" size="10" maxlength="8" datatype="dec" /></dd></dl>
            <dl><dt>说　　明：</dt><dd><textarea name="memo" cols="55" rows="4" class="textarea"></textarea></dd></dl>
            <dl><dt>　　　　　</dt>
                <dd>
                    <a href="javascript:;" class="btn btn_g_s submit"><span><b class="icon icon-ok"></b><em>提交</em></span></a>
                    <a href="javascript:;" class="btn btn_w_s cancel"><span><b class="icon icon-remove"></b><em>取消</em></span></a>
                    <div id="poststate"><span>&nbsp;</span><b></b></div>
                </dd></dl>
        </form>
    </div>
</div>
<script type="text/javascript">
    KS.common.load('account.edit', {}, function() {
<?php if ($type) { ?>$("#type").change();<?php } ?>
    });
</script>